package br.biofoco.p2p.rpc;


public enum Protocol {
	
	TCP, REST, UDP, UDP_MCAST, HTTP, HTTPS;
	
	public static Protocol of(String value) {
		
		value = value.trim().toUpperCase();
		
		for (Protocol proto : Protocol.values()) {
			if (value.equals(proto.toString()))
				return proto;
		}
		
		throw new IllegalArgumentException("Protocol type is not registered!");
	}
}
